﻿

(function () {
    appModule.controller('common.views.basicPersons.detailModal', [
         '$scope', '$uibModalInstance', 'abp.services.app.basicPerson', 'basicPersonId', 'abp.services.app.area', 'actionName', 'basicPerson',
    function ($scope, $uibModalInstance, basicPersonService, basicPersonId, areaService, actionName, basicPerson) {
        var vm = this;

        //首先将basicPerson数据设置为null
        vm.basicPerson = null;


        //取消关闭页面
        vm.cancel = function () {
            $uibModalInstance.dismiss();
        };

        //初始化页面
        function init() {

            //绑定数据
            basicPersonService.getAllBasicPersonByParentID({
                id: basicPersonId
            }).then(function (result) {
                vm.basicPersonList = result.data.items;
            });

        }

        //翻译
        vm.trueChinese = function (val) {
            if (val) {
                return '是';
            }
            else {
                return '否';
            }
        };

        //执行初始化方法
        init();
    }
    ]);
})();